import java.util.*;

public class PermutNum {
    static Scanner input = new Scanner(System.in);

    public static void main(String args[]) {
        System.out.println("请输入n：");
        int n = input.nextInt();
        System.out.println("请输入m：");
        int m = input.nextInt();
        count(n, m);
    }

    public static void count(int n, int m) {
        if (n < m || n < 0 || m <= 0) {
            System.out.println("输入错误，请重新输入");
            System.out.println("确保0<m<=n");
            return;
        }
        int result = 1;
        for (int i = 0; i < m; i++) {
            result *= n;
            n--;
        }
        System.out.println("PermutNum=" + result);
    }
}